<?php

require_once 'Core/Form/Element/Xml.php';

class Core_Form_Element_Partial extends Core_Form_Element_Xml
{
    public $partial;

    /**
     * Initialize object; inherited from Zend_Form_Element_Textarea
     *
     * @return void
     */
    public function init()
    {
        parent::init();
        $this->setDecorators(array(array("ViewScript", array(
            'viewScript' => $this->partial,
            'class'      => 'partial'
        ))));
    }

    /**
     * Sets the partial script
     *
     * @return void
     */
    public function setPartial($script)
    {
        $this->partial = $script;
    }
}